package com.car.dal.dao.teaching;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TgStudent;
import com.car.dal.object.TgTeaching;
import com.car.dal.object.TgUsergrade;
import com.car.dal.object.TgUserinfo;
import com.car.exception.BaseException;
import com.car.util.Page;
import com.ibatis.sqlmap.client.SqlMapClient;

public class TeachingDaoImpl extends IbatisCommonDao<TgTeaching, Integer>  implements TeachingDao{
	@Override
	public void addTgTeaching(TgTeaching teaching) {
			this.insert(teaching);
	}

	@Override
	public List<TgTeaching> getTgTeachingList(TgTeaching teaching,Page page) {
		teaching.setFirstrownum(page.getFirstrownum());
		teaching.setPagesize(page.getPagesize());
		List<TgTeaching> list=this.queryForEntityList(TgTeaching.class,"getTgTeachingList", teaching);
		return list;
	}

	@Override
	public Integer getTgTeachingCount(TgTeaching TgTeaching) {
		Integer total=this.queryForInteger("getTgTeachingCount", TgTeaching);
		return total;
	}

	@Override
	public void deleteAllTeaching() {
		getSqlMapClientTemplate().delete("deleteAllTeaching");
		
	}
	
	

}
